<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function fun() {
            alert("无参函数");
        }
        function fun(a, b) {
            alert("有参函数a=" + a + "，b=" + b);
        }
        fun();//有参函数a=undefined，b=undefined
        fun(2, 3);//有参函数a=2，b=3
    </script>
</head>
<body>

</body>
</html>